home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / CompileStatistics.h < prev    next >
Text File  |  1997-06-28  |  704b  |  38 lines

  1. // CompileStatistics.h
  2.  
  3. #ifndef CompileStatistics_h
  4. #define CompileStatistics_h
  5.  
  6. #ifndef FileStatistics_h
  7. #include "FileStatistics.h"
  8. #endif
  9. #ifndef RedBlackLinkTree_h
  10. #include "RedBlackLinkTree.h"
  11. #endif
  12.  
  13. class CompileStatistics
  14.   {
  15.     private:
  16.         RedBlackLinkTree< ConstPString, FileStatistics > tree;
  17.         uint32 lines;
  18.         uint32 files;
  19.     
  20.         FileStatistics *lastLookup;    // mutable
  21.         
  22.         FileStatistics *Lookup( ConstPString ) const;
  23.         
  24.     public:
  25.         CompileStatistics();
  26.         ~CompileStatistics();
  27.         
  28.         uint32 AverageLines() const;
  29.         
  30.         bool Known( ConstPString name ) const;
  31.         uint32 FileLines( ConstPString ) const;
  32.         
  33.         void AddFile( ConstPString name );
  34.         void SetFileLines( ConstPString, uint32 );
  35.   };
  36.  
  37. #endif
  38.